<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>layout 后台大布局 - Layui</title>
    <link rel="stylesheet" href="css/layui.css">
    <style>
        /*顶部面包屑导航*/
        .myNav {
            padding-top: 20px;
        }

        /*当前链接白色*/
        .layui-breadcrumb a cite {

            color: #fff;
        }

        .layui-breadcrumb > * {
            font-size: 15px;
        }
        .layui-nav-img {
            width: 40px;
            height: 40px;
        }
    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">layui 后台布局</div>


        <!-- 头部区域（可配合layui已有的水平导航） -->
        <!--layui-nav layui-layout-left-->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="">首页</a></li>
            <li class="layui-nav-item"><a href="">A页面</a></li>
            <li class="layui-nav-item"><a href="">B页面</a></li>

        </ul>


        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="images/AG.jpg" class="layui-nav-img">
                    小肥威
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>

                </dl>
            </li>
            <li class="layui-nav-item"><a href="">退出</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） --> <tr>

            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item">
                    <a class="" href="javascript:;">商城管理</a>
                    <dl class="layui-nav-child">
                        <dd><a class="navLink" href="javascript:;" data-url="Mall/GoodsList.html">商品管理</a></dd>
                        <dd><a class="navLink" href="javascript:;" data-url="Mall/GoodsClassify.html">分类管理</a></dd>
                        <dd><a class="navLink" href="javascript:;" data-url="Mall/OrderList.html">订单管理</a></dd>


                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">社区论坛</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">列表一</a></dd>
                        <dd><a href="javascript:;">列表二</a></dd>

                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">会员管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">列表一</a></dd>
                        <dd><a href="javascript:;">列表二</a></dd>

                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">系统管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">列表一</a></dd>
                        <dd><a href="javascript:;">列表二</a></dd>

                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">视频模块</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">列表一</a></dd>
                        <dd><a href="javascript:;">列表二</a></dd>

                    </dl>
                </li>

            </ul>
        </div>
    </div>

    <div class="layui-body" style="overflow: hidden" id="layuiBody">

    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        2018 &copy;那就提前祝大家新年快乐吧
    </div>
</div>
<script src="js/layui.js"></script>
<script src="js/jquery-2.1.1.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function () {
        var element = layui.element;

    });

    //jq 函数开始
    $(function () {

        navLinkClick();
    });




    function navLinkClick() {
        //绑定导航链接的单击事件,地址跳转
        $(".navLink").on("click", function () {
            var myUrl = $(this).data("url");
            var strHtml = showContent(myUrl);
            $("#layuiBody").html(strHtml);

        });
    };

    //动态iframe显示的内容
    function showContent(url) {
        var strHtml = "<iframe src=" + url + " scrolling='no'frameborder='0' width='100%' height='100%' id='myIframe'></iframe>";
        return strHtml;
    }

</script>
</body>
</html>